package com.xiaoyao.novel.pojo;

/**
 * 爬虫配置
 * 
 * @author Administrator
 * 
 */
public class CrawlConfig {
	public int crawlId;// ID
	public String crawlCode; // 标识
	public String crawlName; // 名字
	public String crawlPageHome; // 主页
	public int showOrder;// 排序
	
	public int httpType=0;//0:httpUtil,1:httpClient; 
	public String charset="GBK";//编码 ,GBK,UTF-8
	
	public String describUrl = "http://www.qidian.com/Book/[webId].aspx"; // 描述URL拼接正则
	public String describeRegex; // 描述正则
	
	public String findCategoryRegex;// 在描述页面搜索列表地址正则
	public String categoryUrl = "http://read.qidian.com/BookReader/[webId].aspx"; // 目录列表URL拼接正则
	public String categoryRegex;// 列表正则
	
	public String replaceRegex; // 替换filter
	public String replaceRegexHeader; //
	public String replaceRegexFooter;
	
	public String chapterRegex; // 章节内容正则.

	// ////////////

	public static void main(String[] args) {
		CrawlConfig crawlConfig = new CrawlConfig();
		String describUrl = "http://www.qidian.com/Book/[webId].aspx";
		describUrl = describUrl.replace("[webId]", "3");
		System.out.println(describUrl);
	}

	public int getCrawlId() {
		return crawlId;
	}

	public void setCrawlId(int crawlId) {
		this.crawlId = crawlId;
	}

	public String getCrawlCode() {
		return crawlCode;
	}

	public void setCrawlCode(String crawlCode) {
		this.crawlCode = crawlCode;
	}

	public String getCrawlName() {
		return crawlName;
	}

	public void setCrawlName(String crawlName) {
		this.crawlName = crawlName;
	}

	public String getCrawlPageHome() {
		return crawlPageHome;
	}

	public void setCrawlPageHome(String crawlPageHome) {
		this.crawlPageHome = crawlPageHome;
	}

	public String getReplaceRegex() {
		return replaceRegex;
	}

	public void setReplaceRegex(String replaceRegex) {
		this.replaceRegex = replaceRegex;
	}

	public String getReplaceRegexHeader() {
		return replaceRegexHeader;
	}

	public void setReplaceRegexHeader(String replaceRegexHeader) {
		this.replaceRegexHeader = replaceRegexHeader;
	}

	public String getReplaceRegexFooter() {
		return replaceRegexFooter;
	}

	public void setReplaceRegexFooter(String replaceRegexFooter) {
		this.replaceRegexFooter = replaceRegexFooter;
	}

	public int getShowOrder() {
		return showOrder;
	}

	public void setShowOrder(int showOrder) {
		this.showOrder = showOrder;
	}

	public int getHttpType() {
		return httpType;
	}

	public void setHttpType(int httpType) {
		this.httpType = httpType;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public String getDescribUrl() {
		return describUrl;
	}

	public void setDescribUrl(String describUrl) {
		this.describUrl = describUrl;
	}

	public String getDescribeRegex() {
		return describeRegex;
	}

	public void setDescribeRegex(String describeRegex) {
		this.describeRegex = describeRegex;
	}

	public String getFindCategoryRegex() {
		return findCategoryRegex;
	}

	public void setFindCategoryRegex(String findCategoryRegex) {
		this.findCategoryRegex = findCategoryRegex;
	}

	public String getCategoryUrl() {
		return categoryUrl;
	}

	public void setCategoryUrl(String categoryUrl) {
		this.categoryUrl = categoryUrl;
	}

	public String getCategoryRegex() {
		return categoryRegex;
	}

	public void setCategoryRegex(String categoryRegex) {
		this.categoryRegex = categoryRegex;
	}

	public String getChapterRegex() {
		return chapterRegex;
	}

	public void setChapterRegex(String chapterRegex) {
		this.chapterRegex = chapterRegex;
	}

}
